#include<stdio.h>
int main()
{
	int vul,d,i,t1 = 0,t2 = 0,vul0;
	int sum = 0;
	scanf("%d%d",&vul,&d);
	vul0 = vul;
	if(vul!=0&&d!=0)
	{
		for(i=1;;i++)
		{
			vul0 -= i*d;
			if(vul0<=0)
			{
				int c;
				vul0 += i*d;
				c = (vul%d==0)? 0:1;
				sum = t1+t2+(vul0/d)+c;
				printf("%d\n",sum);
				break;
			}
			t1 += i;
			t2 ++;
		}
	}
	return 0;
}
